package com.huika.dealontop.utils;

import com.huika.huikalib.utils.MoneyShowTool;

/**
 * Author: Victor Wu <br/>
 * Email: victor-wu*foxmail.com <br/>
 * Time: 2015/11/28 15:41 <br/>
 * Description: TODO
 */
public class DistanceUtils {

    public static String formatMeter(double km) {
        if (km > 10) {
            return ">10km";
        } else if (km >= 1) {
            return MoneyShowTool.formatOne(km) + "km";
        } else {
            double meter = km * 1000d;
            return MoneyShowTool.nolastDF(meter) + "m";
        }
    }
}
